// Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
// This source file is part of the Cangjie project, licensed under Apache-2.0
// with Runtime Library Exception.
//
// See https://cangjie-lang.cn/pages/LICENSE for license information.

#ifndef CANGJIE_MIGRATOR_INTERFACES
#define CANGJIE_MIGRATOR_INTERFACES

enum UpdaterMode {
    UPDATER_MODE_FILE = 0,
    UPDATER_MODE_PROJECT = 1,
    UPDATER_MODE_DEVECO = 2,
};

struct UpdaterOption {
    const char *cangjieHome = "";
    const char *version = "";
    const char *source = "";
    const char *target = "";
    const char *importPath = "";
    UpdaterMode mode;
};

using ApplyReturnCode = int;

using GetVersionFunc = const char *(*)();

using ApplyFunc = ApplyReturnCode (*)(const UpdaterOption *option);

#endif // CANGJIE_MIGRATOR_INTERFACES
